package com.ztman.service.work.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ztman.basic.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ztman.service.common.properties.MySqlJsonHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.ztman.basic.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 *
 * </p>
 *
 * @author wsd
 * @since 2021-08-23
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "p_work_order_tpl_data",autoResultMap = true)
@ApiModel(value = "WorkOrderTplData", description = "")
@AllArgsConstructor
public class WorkOrderTplData extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @TableField("work_order")
    @Excel(name = "")
    private Long workOrder;

    @ApiModelProperty(value = "")
    @TableField(value = "form_structure",typeHandler= MySqlJsonHandler.class)
    @Excel(name = "")
    private com.alibaba.fastjson.JSONObject formStructure;

    @ApiModelProperty(value = "")
    @TableField(value = "form_data",typeHandler= MySqlJsonHandler.class)
    @Excel(name = "")
    private com.alibaba.fastjson.JSONObject formData;

    @ApiModelProperty(value = "")
    @TableField("tpl")
    @Excel(name = "")
    private Integer tpl;

    /**
     * 删除状态
     */
    @ApiModelProperty(value = "删除状态")
    @TableField("del_flag")
    @Excel(name = "删除状态", replace = {"是_true", "否_false", "_null"})
    private Boolean delFlag;
    @Builder
    public WorkOrderTplData(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy,
                            Long workOrder, com.alibaba.fastjson.JSONObject formStructure, com.alibaba.fastjson.JSONObject formData, Integer tpl) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.workOrder = workOrder;
        this.formStructure = formStructure;
        this.formData = formData;
        this.tpl = tpl;
    }

}
